﻿namespace Task
{
    /// <summary>
    /// 素材类
    /// </summary>
    public class Material
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public string Type { get; set; }
        public string SubType { get; set; }
        public string Content { get; set; }

        public string Date { get; set; }

        public Material()
        {
        }

        public Material(string name, string type, string subType, string content, string date)
        {
            Name = name;
            Type = type;
            SubType = subType;
            Content = content;
            Date = date;
        }

        public Material(int id, string name, string type, string subtype, string content, string date)
        {
            Id = id;
            Name = name;
            Type = type;
            SubType = subtype;
            Content = content;
            Date = date;
        }

        public override string ToString()
        {
            return "{ Name = " + Name +
                ", Type = " + Type +
                ", SubType = " + SubType +
                ", Content = " + Content +
                ", Date = " + Date +
                "} ";
        }

        public string GetInformation()
        {
            return " 名称：" + Name +
                "\n 类型：" + Type +
                "\n 子类型：" + SubType +
                "\n 内容：" + Content +
                "\n 日期：" + Date;

        }
    }
}
